<template>
    <div class="category">
        <h3>{{title}}</h3>
        <ul>
            <li v-for="(item,index) in dataList" :key="index">{{item}}</li>
        </ul>
        <slot name="center">插槽的默认内容，当插槽插入不成功时会显示</slot>
        <slot name="footer">插槽的默认内容，当插槽插入不成功时会显示</slot>
    </div>
</template>

<script>
    export default {
        name:"Category",
        props:['title','dataList']
    }
</script>

<style scoped>
    .category {
        background-color: antiquewhite;
        width: 200px;
        height: 300px;
    }
    h3 {
        background-color: aqua;
        text-align: center;
    }
</style>